{% extends "base.html" %}
{% load i18n %}
{% block current_page %}{{ exam.course.name }} - {{ exam.title }}{% endblock %}
{% block content %}
<div id="content">
    {% if request.user.is_authenticated %}
    <div id="progress"></div>

    <div>
        <form action="/course/exam/{{ exam.id }}/" method="post" onsubmit="return validateForm();"
              name="exam_form">{% csrf_token %}
            {% for question, choices in questions_list %}
              <div class="question_div">  {{ question}}
                    {% for choice in choices %}
                    <ul>
                        <li><input type="radio" id="question_{{question.id}}" value="{{choice.id}}"
                           name="question_{{question.id}}" onclick="updateProgress( '{{ question_length }}' );" /> {{ choice.answer }}
                      </li>
                     </ul>

            {% endfor %}
              </div>
            {% endfor %}

            <p></p><input type="submit" value="Submit"/></p>
        </form>
    </div>

    {% else %}
    <p>Please login to continue</p>
    {% endif %}
</div>
<div class="break"></div>
{% endblock %}